<?php
/**
 * Created by PhpStorm.
 * User: yuliang
 * Date: 2017/11/1
 * Time: 下午2:27
 */
namespace app\common\model;


use think\Db;
use think\Model;

class Release extends Model
{
//    protected $table = 'tv_release';

    protected $autoWriteTimestamp = 'datetime';

    public function releaseList($id){
        $result = Db::table('tv_release')->field('a.status,a.sort,a.reason,a.account_id,b.name as platform_name,c.account')->alias('a')
            ->join('tv_platform b','a.platform = b.id','LEFT')->join('tv_account c','a.account_id = c.id','LEFT')->where("a.video_id = $id")->select();
        if(!empty($result)){
            return $result;
        }
        return array();
    }

}